#include "pluginitem.h"
#include "ui_pluginitem.h"

PluginItem::PluginItem(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::PluginItem)
{
    ui->setupUi(this);
    setAttribute(Qt::WA_StyledBackground);
}

PluginItem::~PluginItem()
{
    delete ui;
}

void PluginItem::setPluginInfo(const PluginInfo &pluginInfo)
{
    this->pluginInfo = pluginInfo;
    // 更新界面
    this->ui->description->setText(pluginInfo.description);
    this->ui->title->setText(pluginInfo.name);
}

void PluginItem::on_pushButton_clicked()
{
    emit deleteItem(this);
}

